Autofocus (AF) is a process implemented in many camera systems to enable easier focus for users of cameras, sparing them the need to focus manually on objects in their field of view. There are a variety of methods of autofocus, some of them involving technology to assess object distance via sound, laser light, or a number of other methods. The autofocus technology of the present invention involves the use of so-called focus scores.
Focus scores, which are derived directly from images taken by the camera, are produced in a number of ways, well known to those versed in the art. Typically focus scores will reflect the “sharpness” of an image: by noting local regions of great contrast where the transition is especially abrupt. Generally, the filters that calculate focus scores attempt to ignore what is merely noise in the image, since, especially on a pixel to pixel basis, that noise may look like a very sharp transition. Moreover, the filters may attempt to emphasize features that are of greatest interest to the user of the camera—for example, some filters attempt to emphasize transitions to be found in faces. Typically, too, the filters will attend to vertical edges in an image, because scan lines in a sensor are organized horizontally, and so vertical edges are the ones that will show up in filters applied to those horizontal lines.
AF systems are used with both movable lens systems (where the optical power of the lens system is changed by physically moving one or more lenses in the lens system) as well as tunable lenses (where the optical power of the lens is changed by applying an electric voltage or pulse to the lens). Optical power of a lens refers to the amount of focusing (e.g. convergence) that the lens imparts on light (or more specifically a light image) passing therethrough. An example of tunable lenses (TLs) is the Tunable Liquid Crystal Lens (TLCL). A TLCL is a device in which liquid crystal is employed to create the effect of a lens via electrical stimulus (see later) and can be tuned to different levels in a range of optical power by adjusting that electrical stimulus. A TLCL achieves the effect of a lens by creating regions of differing indices of refraction in a liquid crystal when subjected to electrical stimulus (such as a Gradient Index Lens). The TLCL can be adjusted to different levels in a range of optical power by manipulating, for example, the voltages of electrical signal applied to the lens.
There are a number of standard algorithmic techniques that can be employed to converge on the optical power setting with the best focus scores for a given scene. They include the so called fill search (staircase), coarse and fine search (dual staircase), and hill climb.
The full search algorithm, also called the staircase algorithm, involves control of the tunable lens across its full range of optical power in small and even steps, where the focus scores are determined and recorded for each step. Then, the peak of the focus scores is determined, and the optical power of the tunable lens is adjusted to correspond to that for the peak focus score. This technique is referred to as staircase, because the steps up and down in the optical power resembles a staircase. One drawback to this algorithm is that it can be slow to implement, because each small step requires a non-trivial amount of time to complete, and the sheer number of steps in aggregate can add up to a sizable amount of time.
A somewhat similar approach in terms of overall effect is the coarse search/fine search algorithm, also called the dual staircase algorithm. This approach involves the use of a coarse search across the entire optical range of the tunable lens using relatively large, few and even steps, and determining in which region the peak focus score must exist. Then, a fine search is made within just that region using small and even steps to determine the optical power that corresponds to the peak focus score. The tunable lens is then adjusted to that optical power. This technique is referred to as dual staircase algorithm because it involves a coarse staircase search across the entire optical range, followed by a fine staircase search within just that smaller region determined to contain the peak of focus scores.
The hill climbing algorithm is another technique for detecting which optical power setting corresponds to the peak focus score. This technique assumes that there will be one peak in the focus score curve, which is considered a safe assumption in virtually all scenes naturally occurring in consumer photography and video. An hill climbing algorithm is illustrated in FIGS. 1A and 1B, and involves stepping through the optical range of the lens while detecting the climb up a hill in terms of focus scores, and then, immediately after the peak is passed (indicated by a drop in the focus scores), pulling back to the level of optical power at the observed focus score peak.
The general virtue to the hill climbing algorithm is that it involves fewer steps in most cases. Because it stops immediately after the peak of focus scores is passed, the number of steps can be greatly reduced compared, say, to a staircase method which involves going across the entire optical range before retreating to the calculated peak. The hill climbing algorithm could be particularly faster in cases in which the speed in adjusting optical power forward is much faster than the speed in adjusting optical power backward, as well as those cases where the peak focus score is associated with an optical power near the beginning of the focus scan (e.g. the focus score's maximum is situated in the beginning of focus score versus optical power curve). One approach to the hill climb technique involves selecting nearly equally spaced samples across the optical range. This is illustrated in FIG. 1. However, there are more optimal ways in which to space these samples. Because the hill climb approach essentially stops and retreats a bit after it passes over the peak, the amount of time it takes to engage in this procedure depends on how far across the optical range the peak is located. If the peak is near the beginning of the optical range, the procedure will only involve a few steps. But, if the peak is near the end of the optical range, the procedure will involve many steps. Therefore, to reduce the amount of time the entire procedure takes on average, it is preferable to make the steps at the beginning larger than those later in the procedure, as illustrated in FIG. 1B. Far few steps are taken to reach peaks positioned further away from the beginning of the optical range, thus taking less time to complete the entire procedure. In those cases where the peaks are positioned nearer the beginning of the optical range, additional time may be taken to perform larger backwards steps, but this is acceptable because the procedure will have spent relatively little time traveling to that early position. An important constraint on autofocus is the maximum time it takes. So long as the process takes less than some stipulated maximum time, it is generally considered acceptable if it takes close to that amount of time even for focusing procedures involving peaks near the beginning of the optical range.
For some autofocus applications, such as certain camera systems requiring exceptional autofocus speed performance, the staircase, dual staircase, and hill climb procedures that use a step-by-step approach in traveling across the optical range are too slow. There is a need for tunable lenses and systems which provide faster and better performance than that provided by conventional autofocus techniques.